<template>
  <div class="title">
    <div class="icon"></div>
    <div class="left"></div>
    <div class="center"></div>
    <div class="text">
      <b><slot></slot></b>
    </div>
    <div class="right"></div>
  </div>
</template>
<script>
export default {
  name: 'RiskTitle',
  data () {
    return {
      code: `
      `,
      cmOptions: {
        // codemirror options
        tabSize: 4,
        mode: 'sass',
        theme: 'darcula',
        lineNumbers: true,
        line: true
        // more codemirror options, 更多 codemirror 的高级配置...
      }
    }
  }
}
</script>
<!-- Add "scoped" attribute to limit CSS to this component only -->
<style lang="scss" scoped>
.title {
  margin: 5px 15px 0px 35px;
  display: block;
  font-size: 20px;
  height: 38px;
  padding: 0px;
  position: relative;
  .icon {
    width: 21px;
    height: 21px;
    position: absolute;
    left: 0px;
    top: 8px;
    background: url("~@/assets/rs-title02/header-icon.png") no-repeat;
    z-index: 10;
  }
  .left {
    width: 41px;
    height: 38px;
    position: absolute;
    left: 25px;
    top: 0px;
    background: url("~@/assets/rs-title02/title-left.png") no-repeat;
  }
  .right {
    width: 38px;
    height: 38px;
    position: absolute;
    right: 0;
    top: 0px;
    background: url("~@/assets/rs-title02/title-right.png") no-repeat;
  }
  .center {
    width: 73px;
    height: 38px;
    position: absolute;
    left: 50%;
    top: 0px;
    background: url("~@/assets/rs-title02/title-center.png") no-repeat;
  }
  .text {
    height: 38px;
    overflow-y: hidden;
    position: absolute;
    right: 38px;
    line-height: 38px;
    left: 60px;
    top: 0px;
    background: url("~@/assets/rs-title02/title-bg.png") repeat-x;
    b {
      font-weight: bold;
      background: linear-gradient(rgb(251, 0, 0) 70%, #7bd2ff);
      -webkit-background-clip: text;
      color: transparent;
    }
  }
}
</style>
